package cn.txauction.business.service.impl;


import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.txauction.business.service.IAdminService;
import cn.txauction.business.service.base.BaseService;
import cn.txauction.modal.TxAdmins;
import cn.txauction.web.paging.PagingResult;

/**
 * 
 * @author 胡
 *
 */
@Service("adminService")
@Transactional(readOnly = true)
@SuppressWarnings("unchecked")
public class AdminServiceImpl extends BaseService implements
		IAdminService {
	
	@Transactional
	public void addAdmin(TxAdmins emp) {
		// TODO Auto-generated method stub		
		this.adminDao.save(emp);
	}

	public PagingResult<TxAdmins> getPagingAdmins(int firstResult, int maxResult){
		return adminDao.findPagingResult(firstResult, maxResult);
	}

	public TxAdmins adminLogin(TxAdmins admin) {
		return adminDao.adminLogin(admin);
	}
}
